1. Field of the Invention
The present invention concerns a recording medium, an image processing apparatus and method for image processing which concerns an effective image display, or image processing, of a three-dimensional image which is displayed on a screen of a CRT display device or the like.
2. Description of the Related Art
With respect to images, there is a xe2x80x9cblurringxe2x80x9d technique which is used to give a fixed effect of three-dimensionality or sense of perspective. For example, when a picture is taken with a camera, portions which are in sharp focus are photographed distinctly, and accompanying a distancing away from the focus point, the degree of blurring increases. It is known that such blurring imparts a sense of perspective to the photograph.
As a blurring process which is performed by computer processing, there is a technique disclosed, for example, by Japanese Laid-Open Patent Publication 10-74258.
This technique is one for which, with respect to data having distance information, image data having a blurring amount which depends on the distance information is generated by processing the data through a digital low-pass filter having a frequency cutoff corresponding to the distance information.
Notwithstanding, with this technique, because it is required to process image data based on low pass filtering, such as with use of a digital Butterworth filter, the computational burden for attaining the blurred images is extremely large, and accordingly, there is a problem that processing time is required.
The present invention, while taking into consideration this type of problem, has an object of providing a recording medium, image processing apparatus and method for image processing, which is capable of imparting to a three-dimensional display image (containing a three-dimensional image therein) a highly superior specialized effect heretofore unavailable.
Further, the present invention has the object of providing an image processing apparatus and method for image processing capable of easily generating a blurred image.
Furthermore, the present invention has the object of providing an image processing apparatus and method for image processing capable of easily generating a screen image (image) to which a specialized effect is imparted such that, while items existing in the foreground are not blurred, items which are distanced as compared to items in the foreground appear further blurred.
On the recording medium according to the present invention, a program is stored comprising a step of shifting, based on depth amount information of a plurality of three-dimensional objects, at least one pixel portion of an image on a display which corresponds to an object having large depth amount, from among the plurality of three-dimensional objects, and a step of generating a screen image for displaying, on a screen, an image In which the image shifted by one pixel portion thereof is overlaid on the image existing before such one pixel portion shifting takes place, together with an image corresponding to an object having a small depth amount.
According to the present invention, from among a plurality of three-dimensional images, a large depth amount image can be made as an image having a blurred focus. As a result, when seen from the point of An observer (camera), images which are more distant can be seen as blurred images, and images having a small depth amount (images which are in front of the blurred images), can be seen as images which are in focus (distinct images). Further, the pixel number shifted on the display can be selected as an optimal pixel number depending on, for example, the display type or the tastes and so forth of the observer.
In this case, by rendering an image corresponding to a three-dimensional object having a large depth amount on a two-dimensional background image which is rendered to have the largest depth amount, the image display is made more natural.
Further, although the direction of the at least one pixel shift on the display can be in any optional direction, by making this direction to be either an upward direction or a downward direction on the screen, for example, the invention can optimally be applied to an entertainment system (for example, an apparatus having a sound reproduction function using a compact disk CD or an image and sound reproduction function using a video CD, and further having a gaming function) or the like, which uses a horizontal scanning type of display.
Herein, by subjecting the blurred image to a semi-transparency formation processing, the blurred image can be made as a more harmonious image.
Moreover, by making a three-dimensional object to be a fixed and/or moving object, as seen from a viewpoint created by the image which corresponds to the object, for example when the viewpoint is fixed, a moving object which moves from a rearward toward a forward direction of the screen can be changed from a blurred image to a distinct image corresponding to the depth amount thereof. Oppositely, an image which moves from a frontal toward a rearward direction of the screen can be changed from a distinct image (an image in focus) to a blurred image corresponding to the depth amount thereof.
Further, an image processing apparatus according to the present invention comprises a recording means in which a plurality of three-dimensional objects together with depth amount information are stored, a frame buffer having a rendering area in which the plurality of three-dimensional objects are converted into images by a fixed process and rendered, display means for displaying on a screen images rendered in the rendering area of the frame buffer, and rendering control means for performing conversion processing for converting from the three-dimensional objects to the images, wherein the rendering control means shifts, by at least one pixel portion and renders in the frame buffer an image corresponding to an object having a large depth amount, from among the plurality of three-dimensional objects, based on the depth information of the plurality of three-dimensional objects, generates and draws an image (blurred image) for which the image shifted by one pixel portion and rendered is subjected to semi-transparency formation processing and overlaid on the image existing before the one pixel shifting took place, renders in the rendering area the blurred image together with an image having a small depth amount from an image corresponding to the plurality of three-dimensional objects, and displays on the display means the blurred image together with the image having a small depth amount.
The present invention can advantageously be applied to an entertainment system, for example, comprising the recording means, frame buffer, display means and rendering control means.
In this case as well, overlaying onto a two-dimensional image of a farthest distant scene is possible.
Further, a control is provided by which the rendering areas are set as two areas in the frame buffer, and wherein the rendering control means, at a time when an image rendered in one rendering area is being displayed on the screen of the display means, performs rending of an image containing the blurred image in the other rendering area, and after rending of the image containing the blurred image has been completed, the image rendered in the other rendering area is displayed on the screen of the display means, wherein as a result of such control, the present invention can be applied to a frame buffer having a plurality of rendering areas.
In this case as well, the direction of shifting by at least one pixel portion on the screen can be taken as any optional direction, however, in the case of a horizontal scan type of display, an upward or downward direction on the screen is favorable.
Naturally, the three-dimensional object can be a fixed object and/or a moving object, as seen from a viewpoint created by the image corresponding to the object.
Further, the method for image processing according to the present invention comprises a step of preparing source image data in which each pixel value is represented as an RGB value, a step of creating one-pixel shifted image data for which the source image data is shifted by at least one pixel in a predetermined direction, and a step of creating blurred image data formed by overlaying the one-pixel shifted data on the source image data and from RGB values respectively added at a fixed ratio to the RGB values of pixels corresponding in position.
According to this aspect of the invention, blurred image data can be easily created.
In this case, the fixed direction is taken as any of up, down, right or left directions, and by making the fixed ratio to be roughly 50%:50%, an image in which the focus is shifted with respect to the source image can be easily created.
Further, an image processing apparatus according to the present direction comprises: a recording means in which a plurality of three-dimensional objects are recorded together with depth information; a frame buffer having a rendering area in which the plurality of three-dimensional objects are rendered after being subjected to a perspective projection conversion at a fixed viewpoint and converted into images; display means for displaying on a screen a plurality of images which are rendered in the rendering area; and rendering control means for performing the perspective projection conversion processing, wherein the rendering control means, in the rendering area of the frame buffer, classifies images corresponding to the plurality of three-dimensional objects, based on the fixed viewpoint, into a far-distance image group pertaining to the depth information, a mid-distance image group, and a near-distance image group, renders the far-distance image group in the rendering area, renders images (blurred far-distance image group) in the rendering area formed by subjecting to semi-transparency formation processing and overlaying the far-distance image group which has been shifted by at least one pixel portion in a first fixed direction on the far-distance image group existing prior to such shifting, further renders the mid-distance image group in the rendering area, and further, renders in the rendering area images (images formed by a double-blurred far-distance image group and a blurred mid-distance image group) formed by subjecting to semi-transparency formation processing and overlaying the mid-distance image group and the far-distance image group which have been shifted by at least one pixel position in a second fixed direction with respect to the rending area in which the mid-distance image group and far-distance image group are rendered, on the image group existing prior to such shifting, and further renders the near-distance image group in the rendering area.
According to this aspect of the present invention, it becomes possible to simultaneously display on a display device a near-distance image group for which blurring processing is not conducted, a blurred mid-distance image group which is shifted by at least one pixel behind the near-distance image group, and further, a blurred far-distance image group which is shifted by at least two pixels behind the mid-distance image group. By doing so, on the screen of the display device, for example, a distinct near-distance image group, a slightly blurred mid-distance image group, and a further blurred far-distance image group can be observed, and it is possible to observe an image (screen image) which is equivalent to a case in which a camera focus is adjusted on a near-distance image group.
In this case as well, behind the far-distance object group a two-dimensional background image group can be displayed.
Further, the first and second fixed directions can be the same direction or in different directions, wherein as a result, the direction of the blurring can be set at an optional direction.
Furthermore, in the case of a horizontal scan type display device, it is favorable if the direction of shifting by at least one pixel portion, on the screen, is taken to be a shifting direction in either an upward direction or a downward direction.
Still further, the three-dimensional object can be a fixed object and/or a moving object, as seen from a viewpoint created by the image corresponding to the object.